package com.huawei.appgallery.forum.forum.fragment;

import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.huawei.appgallery.forum.base.api.IJGWTabProtocol;
import com.huawei.appgallery.forum.base.ui.JGWTabFragment;
import com.huawei.appgallery.forum.forum.activity.ForumRecommendActivity;
import com.huawei.appmarket.framework.widget.ExpandScrollLayout;
import com.huawei.hmf.annotation.FragmentDefine;
import java.util.List;
import o.bqy;
import o.bsl;
import o.bun.a;
import o.cha;
import o.chx;
import o.dgp;
import o.fho;
import o.fiu;
import o.fjb;
import o.fjm;
import o.FragmentManager;

@FragmentDefine(alias = "ForumRecommendListFragment", protocol = IJGWTabProtocol.class)
public class ForumRecommendListFragment extends JGWTabFragment {

    static class b extends cha {
        public b(Activity activity, FragmentManager juVar, List<dgp> list) {
            super(activity, juVar, list);
        }

        public Fragment ˋ(chx o_chx) {
            if (o_chx == null) {
                return null;
            }
            Object ˋ = o_chx.ˋ();
            if (TextUtils.isEmpty(ˋ)) {
                return null;
            }
            fjb ˎ = fho.ˏ().ˋ("Forum").ˎ("ForumFollowBaseFragment");
            IJGWTabProtocol iJGWTabProtocol = (IJGWTabProtocol) ˎ.ˊ();
            iJGWTabProtocol.setUri(ˋ);
            iJGWTabProtocol.setIsDelayShowLoading(true);
            return fjm.ˏ(fiu.ˊ().ˋ(bqy.ˋ().ˏ(), ˎ)).ˏ();
        }
    }

    public void ˏ(Bundle bundle) {
        this.ʼ = new bsl(this, null, ((IJGWTabProtocol) this.ﹳ.ॱ()).getUri());
        super.ˏ(bundle);
    }

    public ExpandScrollLayout ॱˈ() {
        ExpandScrollLayout ॱˈ = super.ॱˈ();
        this.ॱـ.setBackgroundColor(bqy.ˋ().ˏ().getResources().getColor(a.ˊ));
        return ॱˈ;
    }

    public cha ॱʿ() {
        return new b(ॱˋ(), ʽॱ(), this.ᐝʽ);
    }

    public void ˊ(String str) {
        FragmentActivity ॱˋ = ॱˋ();
        if ((ॱˋ instanceof ForumRecommendActivity) && !TextUtils.isEmpty(str)) {
            ((ForumRecommendActivity) ॱˋ).ˎ(str);
        }
    }

    public void ˋ(@NonNull Bundle bundle) {
        super.ˋ(bundle);
    }
}
